package cn.ly817.jay.DAO;

import cn.ly817.jay.entity.Note;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * Created by LuoYu on 2016/12/7.
 */
@Repository
public interface NoteDao {
    int getUnhandledNumByLeaderId(long leaderId);

    void saveNote(Note note);

    int getNoteNumByMissionId(long missionId);

    List<Note> getDailyNoteByDate(@Param("thisSun")Date thisSun, @Param("thisSat")Date thisSat,@Param("userId")long userId);

    Note getDailyById(long id);

    List<Note> getUnhandledNotesByLeaderId(@Param("leaderId")Long leaderId,@Param("state")boolean state);

    Note getFullNoteById(long noteId);

    Note getCheckNoteById(long noteId);
    //只能更新state,comment和完成度
    void checkSubmit(Note note);

    float getUserDurationScore(@Param("userId")long userId, @Param("start")Date start, @Param("end")Date end);
}
